import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
  title: [{ required: true, message: "业务名为必填项", trigger: "blur" }],
  routerPath: [{ required: true, message: "模块名为必填项", trigger: "blur" }],
  tableName: [{ required: true, message: "数据库名为必填项", trigger: "blur" }],
  modelName: [{ required: true, message: "模型名为必填项", trigger: "blur" }],
  fields: [{ required: true, message: "字段必须配置", trigger: "blur" }]
});
